﻿<%@ Page Language="C#" MasterPageFile="~/pages/master/WebForm.Master" AutoEventWireup="true"
    CodeBehind="DictEdit.aspx.cs" Inherits="BF.Web.pages.Dictionary.DictManagement.DictEdit" %>

<%@ Register Src="../../UserControls/SysAreaControl.ascx" TagName="SysAreaControl"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../../../script/OpenQuery.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(function () {
            //关闭
            $("#<%=btnClose.ClientID %>").click(function () {
                winer.close();
                return false;
            });
        });
    </script>
    <script type="text/javascript" language="javascript">
        function validate() {
            var result = $("#aspnetForm").validate({
                rules: {
                    ctl00$ContentPlaceHolder1$sTableCode: {//表编码
                        required: true,
                        maxlength: 25
                    },
                    ctl00$ContentPlaceHolder1$sTableName: {//表名称
                        required: true,
                        maxlength: 25
                    },
                    ctl00$ContentPlaceHolder1$sCode: {//字典编码
                        required: true,
                        maxlength: 25
                    },
                    ctl00$ContentPlaceHolder1$sName: {//字典名称
                        required: true,
                        maxlength: 25
                    },
                    ctl00$ContentPlaceHolder1$sLookUp: {//查找码
                        required: true,
                        maxlength: 50
                    },
                    ctl00$ContentPlaceHolder1$sMemo: {//备注
                        maxlength: 100
                    }
                },
                messages: {

                },
                errorClass: "errorClass"
            });
            return result.form();
        }

        function addNew() {
            $("#ctl00_ContentPlaceHolder1_sName,#ctl00_ContentPlaceHolder1_sUsualName,ctl00_ContentPlaceHolder1_sCustomName1").val("");
            $("#ctl00_ContentPlaceHolder1_sCustomName2,#ctl00_ContentPlaceHolder1_sCustomName3,#ctl00_ContentPlaceHolder1_sHelp,ctl00_ContentPlaceHolder1_sMemo").val("");
            return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="content04">
        <%--        <thead>
            <tr align="center">
                <td colspan="5" class="content01bt" style="width: 100%">
                    用户基本信息<asp:Literal ID="litAddorEdit" runat="server"></asp:Literal>
                </td>
            </tr>
        </thead>--%>
        <tbody>
            <tr style="height: 18px;">
                <td colspan="4">
                </td>
            </tr>
            <tr style="display: none">
                <td align="right">
                    <span style="color: Red">*</span>地区编码：
                </td>
                <td colspan="3">
                    <uc1:SysAreaControl ID="SysAreaControl1" runat="server" Visible="True" />
                </td>
            </tr>
            <tr style="display: none">
                <td align="right">
                    <span style="color: Red">*</span>表编码：
                </td>
                <td>
                    <tll:DataTextBox ID="sTableCode" runat="server" FeildName="sTableCode" TableName="dic_Dict"
                        Enabled="False">GEN</tll:DataTextBox>
                </td>
                <td align="right">
                    <span style="color: Red">*</span>表名称：
                </td>
                <td>
                    <tll:DataTextBox ID="sTableName" runat="server" FeildName="sTableName" TableName="dic_Dict"
                        Enabled="False">根</tll:DataTextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <span style="color: Red">*</span>编码：
                </td>
                <td>
                    <tll:DataTextBox ID="sCode" runat="server" FeildName="sCode" TableName="dic_Dict"></tll:DataTextBox>
                </td>
                <td align="right">
                    <span style="color: Red">*</span>名称：
                </td>
                <td>
                    <tll:DataTextBox ID="sName" runat="server" FeildName="sName" TableName="dic_Dict"
                        Checked="True" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    <span style="color: Red">*</span>查找码：
                </td>
                <td>
                    <tll:DataTextBox ID="sLookUp" runat="server" FeildName="sLookUp" TableName="dic_Dict"></tll:DataTextBox>
                </td>
                <td align="right">
                    字段1：
                </td>
                <td>
                    <tll:DataTextBox ID="sFlag1" runat="server" FeildName="sFlag1" TableName="dic_Dict"></tll:DataTextBox>
                </td>
            </tr>
            <tr>
              <td align="right">
                    字段2：
                </td>
                <td>
                    <tll:DataTextBox ID="sFlag2" runat="server" FeildName="sFlag2" TableName="dic_Dict"></tll:DataTextBox>
                </td>
                  <td align="right">
                    字段3：
                </td>
                <td>
                    <tll:DataTextBox ID="sFlag3" runat="server" FeildName="sFlag3" TableName="dic_Dict"></tll:DataTextBox>
                </td>
            </tr>
               <tr>
              <td align="right">
                    字段4：
                </td>
                <td>
                    <tll:DataTextBox ID="sFlag4" runat="server" FeildName="sFlag4" TableName="dic_Dict"></tll:DataTextBox>
                </td>
                  <td align="right">
                    字段5：
                </td>
                <td>
                    <tll:DataTextBox ID="sFlag5" runat="server" FeildName="sFlag5" TableName="dic_Dict"></tll:DataTextBox>
                </td>
            </tr>
            <tr>
                <td valign="top" align="right">
                    备注：
                </td>
                <td colspan="3">
                    <tll:DataTextBox ID="sMemo" runat="server" FeildName="sMemo" TableName="dic_Dict"
                        Height="100px" Width="387px"></tll:DataTextBox>
                </td>
            </tr>
            <tr style="display: none">
                <td align="right">
                    <span style="color: Red">*</span>启用：
                </td>
                <td colspan="3">
                    <tll:DataCheckBox ID="iUse" runat="server" FeildName="iUse" TableName="dic_Dict"
                        FalseValue="0" TrueValue="1" />
                </td>
            </tr>
        </tbody>
    </table>
    <table width="100%" height="36" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr style="height: 18px;">
            <td />
        </tr>
        <tr>
            <td align="center">
                <input id="btnReset" runat="server" type="button" class="btn04" value="新增" onclick="window.location.href=$('#ctl00_ContentPlaceHolder1_hidAddUrl').val();parent.win.setTitle('字典新增');" />
                <asp:Button ID="btnAdd" runat="server" Style="margin-left: 5px" OnClientClick="return validate();"
                    TabIndex="0" Text="保存" class="btn04" OnClick="btnAdd_Click" />
                <asp:Button ID="btnSave" runat="server" Style="margin-left: 5px" TabIndex="0" Text="保存"
                    class="btn04" OnClick="btnSave_Click" OnClientClick="return validate();" />
                <asp:Button ID="btnClose" runat="server" Style="margin-left: 5px" TabIndex="0" Text="关闭"
                    class="btn04" />
            </td>
        </tr>
    </table>
    <asp:HiddenField ID="hidAddUrl" runat="server" />
    <asp:UpdatePanel ID="Updatepanel1" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
